package com.healthcarex.hip.saas.security.vo;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author  ChenPan
 * @date   2018/7/6 16:38
 * description:
 */
public class SimpleUser extends User {

    @Getter
    @Setter
    private Integer userId;

    public SimpleUser(Integer userId, String username, String password, boolean enabled, boolean accountNonExpired,
                      boolean credentialsNonExpired, boolean accountNonLocked,
                      Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.userId = userId;
    }
}
